package com.crawler.waf.exceptions.extendExceptions;

import org.springframework.http.HttpStatus;

import com.crawler.waf.exceptions.messages.ErrorMessage;
/**
 * 标准异常类
 *
 */
@SuppressWarnings("serial")
public class WafStandedException extends RuntimeException implements WafExceptionSupport {

	private ErrorMessage errorMessage;
	private HttpStatus status;
	
	public WafStandedException(ErrorMessage message,HttpStatus status) {
		super(message.getMessage());
		this.errorMessage = message;
		this.status = status;
	}
	
	@Override
	public ErrorMessage getErrorMessage() {
		return errorMessage;
	}

	@Override
	public HttpStatus getStatus() {
		return status;
	}

}
